﻿// -----------------------------------------------------------------------
// <copyright file="ConfigHelper.cs" company="Microsoft">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace SpaceshipDuel
{
    using System.IO;
    using System.Xml.Serialization;

    /// <summary>
    /// Helper for reading configuration data
    /// </summary>
    public static class ConfigHelper
    {
        private static bool readConfig;

        static ConfigHelper()
        {
            readConfig = true;
        }

        /// <summary>
        /// Deserialisierung aus XML-Datei (Laden)
        /// </summary>
        /// <returns></returns>
        static ConfigData DeserializeFromXml()
        {
            XmlSerializer serializer = new XmlSerializer(typeof(ConfigData));
            string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
            FileStream file = new FileStream(path + "\\config.xml", FileMode.Open);
            ConfigData myData = serializer.Deserialize(file) as ConfigData;
            file.Close();
            return myData;
        }

        // GetKeys
        // GetGraphic
        // GetSound
    }
}
